package oa.hleast.xswl.service.activity;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import oa.hleast.xswl.pojo.domain.activity.CmsActivityCalendar;
import oa.hleast.xswl.pojo.domain.activity.CmsActivityTemplate;
import oa.hleast.xswl.pojo.domain.activity.CmsCommonActivity;
import oa.hleast.xswl.pojo.dto.CommonResponse;
import oa.hleast.xswl.pojo.form.activity.CmsCommonActivityForm;
import oa.hleast.xswl.pojo.form.activity.SignInByManagerForm;
import oa.hleast.xswl.pojo.vo.activity.*;

import java.util.List;
import java.util.Map;

public interface ICmsCommonActivityService extends IService<CmsCommonActivity> {

    boolean add(CmsCommonActivityForm form);

    boolean update(CmsCommonActivityForm form);

    Page<CmsCommonActivity> pageList(Integer page, Integer limit, Long activityTypeId, Integer display);

    boolean deleteByIds(List<String> asList);

    ShowCommonActivityVo detail(Long id, Long userId);

    Page<CmsCommonActivity> activityPageList(Integer page, Integer limit, Long typeId, boolean dispaly);

    List<CmsActivityCalendar> findActivityByTime(Long activityId, Integer year, Integer month);

    List<ShowActivityCalendarVo> pageActivityAfterToday(Integer page, Integer limit, Long activityId);

    Page<ShowCommonActivityVo> findShowActivity(Integer page, Integer limit, Long activityTypeId);

    CmsActivityTemplate signInAndGetTemplate(Long activityId);

    /**
     * 用户签到
     *
     * @param userId     用户ID
     * @param activityId 活动ID
     */
    boolean userSignIn(Long userId, Long activityId, Long calenderId, Integer userType);

    /**
     * 教师验签
     */
    Boolean signInFormTeacher(Long managerUserId, List<SignInByManagerForm> formList);

    List<ShowCommonActivityVo> findAllManagerActivity(Long managerUserId);

    List<ManagerCommonActivityVo> managerScanCode(Long managerUserId, Long userId);

    Boolean deleteById(Long id);

    /**
     * 获取活动状态及开始结束时间
     *
     * @return activityStatus 活动状态 0报名中 1进行中 2已结束 3未开始
     * activityStartDate 开始时间
     * activityEndDate 结束时间
     * startDateFormat 格式化开始时间 yy-MM-dd HH:mm
     * endDateFormat 格式化结束时间 yy-MM-dd HH:mm
     */
    Map<String, Object> getActivityStatus(Long activityId);

    List<ManagerCommonActivityVo> getVenueActivity(Long userId, Long managerUserId);

    List<TodayCommonActivityVo> findTodaySignInForTeacher(Long teacherUserId);

    HttpShowActivitySignUpVo getActivitySignUp(Long id);

}